<!-- 根组件文件 -->

<template>
  <div>
    <!-- <h1>{{message}}</h1> -->
     <!--  引用element组件-->
     <!-- <element-view></element-view> -->

      <!-- 员工组件 和文件名称保持一致 -->
      <!-- <emp-view></emp-view> -->
      <!-- <dept-view></dept-view> -->

      <!-- 路由组件 -->
       <router-view></router-view>
  </div>
</template>


<script >

// 不引用的组件 这里需要注释掉 否则会检测语法错误

// import ElementView from './views/element/ElementView.vue'
// import DeptView from './views/tlias/DeptView.vue';
// import EmpView from './views/tlias/EmpView.vue';




// 解决ERROR ResizeObserver loop completed with undelivered notifications.
const debounce = (fn, delay) => {
  let timer = null;
  return function () {
    let context = this;
    let args = arguments;
    clearTimeout(timer);
    timer = setTimeout(function () {
      fn.apply(context, args);
    }, delay);
  };
};

// 解决ERROR ResizeObserver loop completed with undelivered notifications.
const _ResizeObserver = window.ResizeObserver;
window.ResizeObserver = class ResizeObserver extends _ResizeObserver {
  constructor(callback) {
    callback = debounce(callback, 16);
    super(callback);
  }
};




export default {

  // 不引用的组件 这里需要注释掉 否则会检测语法错误

  components: {  /*EmpView,ElementView*/ },
  
  data() {
    return {
      message: "hello"
    }
  },
  methods: {

  }
}

</script>


<style>

</style>
